IXRUN
Section: User Commands (1)
Index
Return to Main Contents
NAME
ixrun - run AmigaOS scripts from within /bin/sh
SYNOPSIS
ixrun
[
-q
|
-qv
|
-n
|
-nv
] filename [ arguments... ]
DESCRIPTION
Ixrun
makes it possible to run AmigaOS scripts from /bin/sh or from other Unix programs.
The
ixemul.library
uses the first line of a file to find out to which program it should feed the file.
Normally this is
/bin/sh,
but you can use any program you want. Shell scripts usually start with
#!/bin/sh.
Unfortunately, AmigaOS scripts use a semi-colon to start a comment, not the
#-sign.
However, the
ixemul.library
also accepts
;!.
So one would expect that starting a script with
;!/c/execute
would work. But it doesn't. First of all,
c:execute
does some weird things that prevent us from using this possibility.
Secondly, AmigaOS won't recognize the
.key
sequence unless it is at the beginning of the script. To work around
this second problem, the
ixemul.library
skips the first line of the script if it starts with
.key.
So you should put the
;!
sequence at the second line instead. If you
don't
use
.key,
then you should put the
;!
sequence at the beginning of the script as usual.
To work around the first problem I wrote
ixrun,
a small utility to replace
c:execute.
Just start an AmigaOS script with
;!/bin/ixrun
(possibly preceeded by the
.key
line) and you can now run it from within
/bin/sh
or any other Unix program.
OPTIONS
- -n
-
Don't put quotes around the arguments.
- -q
-
Put quotes around every argument that you pass to your script. This is the default.
ixrun
builds a command line which starts with the filename of the script (the
filename
argument) followed by the other arguments passed to
ixrun.
This command line is executed by calling the
dos.library
function
Execute.
That is,
ixrun script "Hello world"
will execute
script "Hello
world ,
as one would expect. But
ixrun -n script "Hello world"
will execute
script Hello
world.
That is, the single argument
Hello world
has been split into two. So take care.
- -qv
-
Debugging: show the command line that should be executed if the option
-q
was used, without actually executing it.
- -nv
-
Debugging: show the command line that should be executed if the option
-n
was used, without actually executing it.
AUTHOR
Hans Verkuil
(hans@wyst.hobby.nl)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 16:29:00 GMT, April 18, 2022